package com.wr.hangzhounewlight.obj.database;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @author yuanzhizhuo
 * createDate 2025/10/27
 */
@Data
@NoArgsConstructor
@TableName("recipe")
public class RecipeEntity {

    @TableId(type = IdType.AUTO)
    private Long id;
    private String orderId;
    private String silo;
    private Double ratio;
    private Double ratioAct;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime insertTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


    /**
     * 新增配料比例
     *
     * @param orderNoId 组合单号id
     * @param silo      料仓名称
     * @param ratio     配料比例
     */
    public RecipeEntity(String orderNoId, String silo, Double ratio) {
        this.orderId = orderNoId;
        this.silo = silo;
        this.ratio = ratio;
    }

}
